x86/traps: Drop dummy_nmi_callback()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 8 Oct 2021 12:11:21 +0000 (13:11 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 29 Nov 2021 13:53:05 +0000 (13:53 +0000)
commit04c48ccd75963891e377c5f27dd7411dde1a4286
treedcb9c04a32e7d70d09169fb932c23e6c46a3b0e0
parentd9f60a924c03761081b99145a51bc85ee54efcdc
x86/traps: Drop dummy_nmi_callback()

The unconditional nmi_callback() call in do_nmi() calls dummy_nmi_callback()
in all cases other than for a few specific and rare tasks (alternative
patching, microcode loading, etc).

Indirect calls are expensive under retpoline, so rearrange the logic to use
NULL as the default, and skip the call entirely in the common case.

While rearranging the code, fold the exit paths.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/traps.c